package com.itfreer.data.general.configuration;

import com.itfreer.utils.PropertiesUtils;

/**
 * 定义默认配置信息读取类
 */
public class DefulatConfig {

	public static final DefulatConfig defulatConfig = new DefulatConfig();

	/**
	 * 服务端口号
	 */
	public String Port = "3306";
	/**
	 * 数据库名称
	 */
	public String Database = "";

	/**
	 * 用户名
	 */
	public String UserID = "";

	/**
	 * 密码
	 */
	public String Password = "";

	/**
	 * 数据库版本
	 */
	public int Version = 1;

	/**
	 * 数据库类型
	 */
	public int DbProvideType = 1;

	public DefulatConfig() {
		init();
	}

	public void ReInit() {
		init();
	}

	private void init() {
		PropertiesUtils pro = new PropertiesUtils();
//		pro.iniFile("resources/orm/jdbc.properties");
//		initialSize = Integer.parseInt(pro.read("initialSize"));
//		maxActive = Integer.parseInt(pro.read("maxActive"));
//		Server = pro.read("Server");
//		Port = pro.read("Port");
//		Database = pro.read("Database");
//		NetName = pro.read("NetName");
//		UserID = pro.read("UserID");
//		Password = pro.read("Password");
//		Version = pro.read("Version");
//		DbProvideType = Integer.parseInt(pro.read("DbProvideType"));
	}
}